﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MiniScrum.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            MiniScrum.Models.User user = (System.Threading.Thread.CurrentPrincipal as MiniScrum.Models.User);

            if (user.IsInRole("Admin"))
                return RedirectToAction("List", "ScrumSummary");
            if (user.IsInRole("TeamMember"))
                return RedirectToAction("UserScrumSummary", "ScrumSummary");
            return RedirectToAction("Logon", "User");
        }

    }
}
